﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="productsort.ascx.cs" Inherits="CustomTool_productsort" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.Sql" %>
<%@ import Namespace="System.Xml" %>
<%@ import Namespace="System.Data.SqlClient" %>

<link rel="stylesheet" type="text/css" href= "<%= ResolveUrl("productsort/productsort.css")%>"/>

<div id="DIV" style="width: 250px; height: 290px;">
  <div id="idSlideView3" class="sv3">
  <% 
      try
      {
          BLL.Business.BookBLL bookBLL = new BLL.Business.BookBLL();
       
          DataSet dsBig = new DataSet();
          dsBig = bookBLL.SelectBigType();                         // 获得大类的信息

          foreach (DataRow bigRow in dsBig.Tables[0].Rows)
          {
              String BigTypeId = bigRow.ItemArray[0].ToString();   // 获得大类编号
              String BigTypeName = bigRow.ItemArray[1].ToString(); // 获得大类名称
            %>
            <dl>
              <dt> <%= BigTypeName%> </dt>
            <%

              DataSet dsSmall = new DataSet();
              dsSmall = bookBLL.SelectSmallType(Int32.Parse(BigTypeId));

              foreach (DataRow smallRow in dsSmall.Tables[0].Rows)
              {
                  String SmallTypeId = smallRow.ItemArray[0].ToString();
                  String SmallTypeName = smallRow.ItemArray[1].ToString();
                 %>  
                   <dd> <a href='productShow.aspx?url=productList.aspx?SmallType_Namestr=<%= SmallTypeName%>' style="text-align:left; height: 20px;"><%= SmallTypeName%> </a></dd>
                 <%}%>
                 </dl>
            <%
           }
      }
      catch (Exception ex)
      {
          Response.Write("<script>alert('" + ex.Message.ToString() + "')</script>");
      }
      %>
   </div>
</div>
<%--必须放在地下--%>
<script type="text/javascript" src="<%= ResolveUrl("productsort/productsort.js")%>"></script>

